<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--fragment的使用-->

<head th:fragment="header(title)">
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../static/semantic.min.css" th:href="@{/semantic.min.css}">
    <script
            src="https://code.jquery.com/jquery-3.1.1.min.js" th:src="@{/jquery-3.1.1.min.js}"
            integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
            crossorigin="anonymous"></script>
    <script src="../static/semantic.min.js" th:src="@{/semantic.min.js}"></script>
    <title th:replace="${title}">Title</title>
</head>
<!--管理员后台-->
<head th:fragment="adminHeader(title)">
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../static/semantic.min.css" th:href="@{/semantic.min.css}">
    <script
            src="https://code.jquery.com/jquery-3.1.1.min.js" th:src="@{/jquery-3.1.1.min.js}"
            integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
            crossorigin="anonymous"></script>
    <script src="../static/semantic.min.js" th:src="@{/semantic.min.js}"></script>
    <title th:replace="${title}">Title</title>
</head>

<body>
<div class="ui borderless main menu" th:fragment="menu(active,color)">
    <div class="ui huge text container">
        <a class="item" href="#" th:classappend="${active==1}?'active ' + ${color}" th:href="@{/}">
            <i class="home icon"></i> 主页
        </a>
        <a class="item" href="category.html" th:classappend="${active==2} ? 'active ' + ${color}"
           th:href="@{/category}">
            <i class="folder icon"></i> 分类
        </a>
        <a class="item" href="archive.html" th:classappend="${active==3} ? 'active ' + ${color}" th:href="@{/archive}">
            <i class="archive icon"></i> 归档
        </a>
        <a class="item" href="tags.html" th:classappend="${active==4} ? 'active ' + ${color}" th:href="@{/tags}">
            <i class="tags icon"></i> 标签
        </a>
        <div class="ui simple green dropdown item">
            更多
            <i class="dropdown icon"></i>
            <div class="menu">
                <a class="item"><i class="chess king icon"></i> 关于作者</a>
                <a class="item"><i class="language icon"></i> 选择语言</a>
                <a class="item" th:href="@{/admin}"><i class="user icon"></i> 作者登录</a>
            </div>
        </div>
        <div class="right item">
            <div class="ui icon input">
                <input type="text" placeholder="搜索...">
                <i class="search icon"></i>
            </div>
        </div>
    </div>
</div>
<div class="ui borderless inverted main menu" th:fragment="adminMenu(active,color)">
    <div class="ui huge inverted text container">
        <a class="item" href="index.html" th:classappend="${active==1} ? 'active ' + ${color}"
           th:href="@{/admin/index}">
            <i class="home icon"></i> 主页
        </a>
        <a class="item" href="category.html" th:classappend="${active==2} ? 'active ' + ${color}"
           th:href="@{/admin/category}">
            <i class="folder icon"></i> 分类
        </a>
        <a class="item" href="tags.html" th:classappend="${active==3} ? 'active ' + ${color}" th:href="@{/admin/tags}">
            <i class="tags icon"></i> 标签
        </a>
    </div>
</div>
</body>
</html>